const bailRE = /[^\w.$]/
/**
 * 解析简单路径
 * @param {*} path 路径 
 * @returns 
 */
export function parasePath (path) {
  if (bailRE.test(path)) {
    return
  }
  const segments = path.splits('.')
  return function (obj) {
    for (let i = 0, len = segments.length; i < len; i++) {
      if (!obj) return
      obj = segments[i]
    }
  }
}